import instance from '@/utils/request.js'



export const userLogin = (data) => {
  return instance({
    url: '/user',
    method: 'post',
    data,
  })
};


export const getUserInfo = () => {
  return instance({
    url: '/user',
    method: 'get',
  })
}

export const userLogout = (id) => {
  return instance({
    url: `/user/${id}`,
    method: 'delete',
  })
}

export const userUpdatePassword = (data) => {
  return instance({
    url: '/user/updatePwd',
    method: 'put',
    data
  })
};

export const userUpdate = (data) => {
  return instance({
    url: '/user',
    method: 'put',
    data,
  })
};
